package com.usian.search.controller;

import com.usian.apis.search.ApUserSearchControllerAPI;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.search.dto.UserSearchDto;
import com.usian.search.service.ApUserSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.ws.rs.POST;

@RestController
@RequestMapping("/api/v1/history")
public class ApUserSearchController  implements ApUserSearchControllerAPI {

    @Autowired
    private ApUserSearchService apUserSearchService;

    /**
     * 查询用户搜索记录
     * @param userSearchDto
     * @return
     */
    @Override
    @PostMapping("/load")
    public ResponseResult findUserSearch(@RequestBody UserSearchDto userSearchDto) {
        return apUserSearchService.findUserSearch(userSearchDto);
    }
}
